package com.yingpai.fitness.dvp_2_0.main.activity.dynamic;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.view.View;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;

import com.scwang.smartrefresh.header.MaterialHeader;
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.scwang.smartrefresh.layout.api.RefreshLayout;
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;
import com.yingpai.fitness.R;
import com.yingpai.fitness.dvp_2_0.common.activity.CommonActivity;
import com.yingpai.fitness.dvp_2_0.common.adapter.BaseAdapterHelper;
import com.yingpai.fitness.dvp_2_0.common.adapter.QuickAdapter;
import com.yingpai.fitness.dvp_2_0.common.util.constant.Contacts;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * Created by ASUS on 2019/2/28.
 */

public class DynamicCommentActivity extends CommonActivity implements OnRefreshLoadMoreListener {

    @BindView(R.id.empty)
    LinearLayout empty;
    @BindView(R.id.listview)
    ListView listview;
    @BindView(R.id.refreshLayout)
    SmartRefreshLayout refreshLayout;
    @BindView(R.id.edittext)
    EditText edittext;
    @BindView(R.id.send)
    TextView send;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setStatusFlag(Contacts.NORMAL_STATUS);
        setContentView(R.layout.activity_dynamic_comment);
    }

    @Override
    protected void initView() {

        setTitle("4评论");
        refreshLayout.setOnRefreshLoadMoreListener(this);
        refreshLayout.setRefreshHeader(new MaterialHeader(context).setColorSchemeResources(R.color.common_color));

        QuickAdapter<String> quickAdapter = new QuickAdapter<String>(context,R.layout.item_dynamic_comment) {
            @Override
            protected void convert(BaseAdapterHelper helper, String item) {

            }
        };

        listview.setAdapter(quickAdapter);

        quickAdapter.add("");
        quickAdapter.add("");
        quickAdapter.add("");
        quickAdapter.add("");
        quickAdapter.notifyDataSetChanged();
    }

    @Override
    protected void initData() {

    }

    @Override
    @OnClick({R.id.empty, R.id.send})
    public void onViewClicked(View view) {
        super.onViewClicked(view);
        switch (view.getId()) {
            case R.id.empty:
                break;
            case R.id.send:
                break;
        }
    }

    @Override
    public void onLoadMore(@NonNull RefreshLayout refreshLayout) {

    }

    @Override
    public void onRefresh(@NonNull RefreshLayout refreshLayout) {

    }
}
